#ifndef __TASKQUEUE_H__
#define __TASKQUEUE_H__
#include <condition_variable>
#include <iostream>
#include <queue>
#include <mutex>
#include <type_traits>
#include <thread>
using std::queue;
using std::mutex;
using std::condition_variable;

class TaskQueue{
public:
    TaskQueue(size_t capa);
    ~TaskQueue();
    void push(int value);
    int pop();
    bool empty();
    bool full();
private:
    size_t _capacity;
    queue<int> _que;
    mutex _mtx;
    condition_variable _notEmpty;
    condition_variable _notFull;
};

#endif

